<template>
	<view class="content">
		<view class="tn-flex tn-footerfixed">
			<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
				<uni-pagination
					title="标题文字"
					:current="current" 
					:total="total" 
					:page-size="pageSize"  
					:show-icon="true"
					@change="onPagination" />
				<view class="">
					<view>
						<text class="">当前页：{{ current }}，数据总量：{{ total }}条，每页数据：{{ pageSize }}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	const app = getApp();
	import Routine from '@/libs/routine';
	import {
		TOKENNAME,
		HTTP_REQUEST_URL
	} from '@/config/app.js';
	import {
		HTTP_ADMIN_URL
	} from '@/config/app.js';
	import store from '@/store';
	export default {
		name: 'dawnPagination',
		props: {
			current: {
				type: [Number, String],
				default: 1
			},
			total: {
				// 数据总量
				type: [Number, String],
				default: 0
			},
			pageSize: {
				// 每页数据量
				type: [Number, String],
				default: 10
			}
		},
		data() {
			return {
				labelWidth: 140,
				inputHeight: 58
			}
		},
		mounted() {
			console.info("dawnPagination mounted");
		},
		methods: {
			onPagination(e) {
				const pageData = {
					pageSize:this.pageSize,
					pageNo:e.current
				}
				this.$emit('pagination', pageData);
			},
			click(event) {
				console.table(event);
				this[event.methods] && this[event.methods](event)
			}
		},
	}
</script>

<style lang="scss" scoped>

</style>